<?PHP


foreach($_POST as $post_key => $value)
{

	$haystack = $post_key;
	$needle = '_';
	$result = substr($haystack, 0, strpos($haystack, $needle));	

	if($result=='apply')
	{
	$y[$post_key]=$_POST[$post_key];	
	}
	$whatpostkey = str_replace("apply_", "", $post_key);
	$whatpostkey = str_replace("_", " ", $whatpostkey);
	$whatpostkey = ucwords($whatpostkey);
//	echo $whatpostkey." : ".$_POST[$post_key]."<br />";
	
	$mailer->mail_data .=$whatpostkey." : ".$_POST[$post_key]."<br />";
}
echo 	$mailer->mail_data;

$mailer->mail_name=$conf->a['Kroquis Design'];
$mailer->mail_to=$conf->a['contact-form-recepient'];
//$mailer->mail_to='plpoco@gdfi.com.ph';
$mailer->mail_sender=$_POST['Name'];
//$mailer->mail_from=$_POST['apply_email'];
$mailer->mail_from=$_POST['Email'];

$mailer->mail_message=$mailer->mail_data;
$mailer->mail_subject='New Application from: '.$_POST['Name'];
$mailer->mail_reply_to=$conf->a['reply-to'];



?>